php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#262227 - 11/06/03 09:10 PM Beta-[6.4] Online Users 2.1
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Mod Name / Version: Online Users 2.1 <br /> <br />Description: This is a modification that adds information on about the online status of users next to their username on posts made by them. <br /> <br />[:"red"]Version 2.0 is only an update to make it work with UBB.threads 6.4. <br /> <br />Version 2.1 is a small bugfix to make sure everyone is listed as online.[/] <br /> <br />Working Under: UBB.Threads 6.4 <br /> <br />Mod Status: Beta <br /> <br />Any pre-requisites: PHP 4 <br /> <br />Author(s): Gardener <br /> <br />Date: 11 Dec 2003 <br /> <br />Credits: ericgtr for updating to 6.4, Catshadow for requesting it the last time. <br /> <br />Files Altered: showthreaded.php, showflat.php, templates/default/showthreaded.tmpl, templates/default/showflat.tmpl <br /> <br />New Files: None <br /> <br />Database Altered: No <br /> <br />Info/Instructions: I don't have any pictures for this so you will have to provide them yourself if you don't like the text. If anyone has any appropriate pictures I would glagly add them to the code and update the instructions if they send them to me. <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attachments
98992-Online_Users_for_6_4.txt (198 downloads)



Edited by Gardener (12/10/03 06:48 PM)

Top
#262228 - 11/06/03 05:31 PM Re: Beta-[6.4] Online Users 2.0 [Re: c0bra]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Thanks. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#262229 - 11/07/03 02:28 PM Re: Beta-[6.4] Online Users 2.0 [Re: Daine]
DLWebmaestro Offline
Addict

Registered: 08/08/00
Posts: 1802
Loc: North Carolina
Sweet work! <img src="http://www.ubbdev.com/forum/images/graemlins/waytogo.gif" alt="" />

Top
#262230 - 11/07/03 03:35 PM Re: Beta-[6.4] Online Users 2.0 [Re: eslmix]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
All credits go to ericgtr who updated it, I just released it. =]
_________________________
/Gardener | Complete list of my mods

Top
#262231 - 11/11/03 12:48 AM Re: Beta-[6.4] Online Users 2.0 [Re: c0bra]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
Thanks Ericgtr running on my 6.4

Top
#262232 - 11/11/03 09:42 AM Re: Beta-[6.4] Online Users 2.0 [Re: Kelly]
ericgtr Offline
Junior Member

Registered: 05/12/03
Posts: 1109
NP guys but all I did was update the instructions to 6.4br1, mostly just placement. This baby is 100% Gardener's and a very cool mod at that <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#262233 - 11/11/03 02:49 PM Re: Beta-[6.4] Online Users 2.0 [Re: BlarC]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
Ok thanks to gardner too.. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> Members loving it already

Top
#262234 - 12/10/03 04:30 PM Re: Beta-[6.4] Online Users 2.0 [Re: Kelly]
Turbosport Offline
Member

Registered: 09/08/01
Posts: 157
Loc: Kent, UK.
I found a lot of users were not showing as online even though the online screen showed them, upon investigation thier U_visible wasnt set at all, so I have changed:<br />$Visible == "yes" to $Visible != "no" in the showflat and show threaded.php files.<br /><br />I also ran this query to make sure everyone was set to yes <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!

Top
#262235 - 12/10/03 06:46 PM Re: Beta-[6.4] Online Users 2.0 [Re: groov_richmond]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
OK, thanks for the bug report and fix, I'll update the first post of the thread with this change.
_________________________
/Gardener | Complete list of my mods

Top
#262236 - 12/11/03 11:15 AM Re: Beta-[6.4] Online Users 2.0 [Re: c0bra]
Turbosport Offline
Member

Registered: 09/08/01
Posts: 157
Loc: Kent, UK.
A user has reported that when viewing a post the users online in the extra info are showing 0, any one else get this ?
_________________________
Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!

Top
#262237 - 12/11/03 02:26 PM Re: Beta-[6.4] Online Users 2.0 [Re: groov_richmond]
Turbosport Offline
Member

Registered: 09/08/01
Posts: 157
Loc: Kent, UK.
what I mean is this variable is staying at '0'
_________________________
Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!

Top
#262238 - 12/11/03 02:28 PM Re: Beta-[6.4] Online Users 2.0 [Re: groov_richmond]
Turbosport Offline
Member

Registered: 09/08/01
Posts: 157
Loc: Kent, UK.
I have split the query back into two to get it to work:<br /><br />
Code:
<br />// Find out how many are browsing this forum<br />   $query = "<br />      SELECT O_Type,O_Board,COUNT(*)<br />      FROM   {$config['tbprefix']}Online<br />      WHERE  O_Board = '$Board'<br />      GROUP BY O_Type<br />   ";<br />   $sth = $dbh -&gt; do_query($query);<br />   $a = "0";<br />   $r = "0";<br />   while (list($Type,$Extra,$onlinecount) = $dbh -&gt; fetch_array($sth)) {<br />      ${$Type} = $onlinecount;<br />   }<br /><br />// Start of Online Users hack.<br />// Find out how many are browsing this forum and check who are online.<br />   $Outdated = $html -&gt; get_date() - 1800;<br />   $queryOnline = "<br />      SELECT O_Uid,O_Type,O_Extra<br />      FROM   {$config['tbprefix']}Online<br />      WHERE  O_Last &gt; $Outdated<br />      ORDER BY O_Last DESC<br />   ";<br />   $sth = $dbh -&gt; do_query($queryOnline);<br /><br />   while (list($ol_usernum,$Type,$Extra) = $dbh -&gt; fetch_array($sth)) {<br />      // Check if the user is browsing this board and update the counters accordingly<br />      // Add this user to the list of online users if they are logged in.<br />      if ( $ol_usernum ) {<br />        $OnlineUsers[] = $ol_usernum;<br />      }}<br />
_________________________
Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!

Top
#262239 - 12/12/03 01:56 AM Re: Beta-[6.4] Online Users 2.0 [Re: groov_richmond]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Actually that is not necessary, the reason it didn't work properly is because the info about which board they are visiting has been changed in 6.4 which wasn't taken into consideration when the mod was updated. Try this:<br /><br />
Code:
#<br /># Find this:<br />#<br /><br />// Find out how many are browsing this forum<br />   $query = "<br />      SELECT O_Type,O_Board,COUNT(*)<br />      FROM   {$config['tbprefix']}Online<br />      WHERE  O_Board = '$Board'<br />      GROUP BY O_Type<br />   ";<br />   $sth = $dbh -&gt; do_query($query);<br />   $a = "0";<br />   $r = "0";<br />   while (list($Type,$Extra,$onlinecount) = $dbh -&gt; fetch_array($sth)) {<br />      ${$Type} = $onlinecount;<br />   }<br /><br />#<br /># Change to:<br />#<br /><br />// Start of Online Users hack.<br />// Find out how many are browsing this forum and check who are online.<br />   $Outdated = $html -&gt; get_date() - 600;<br />   $queryOnline = "<br />      SELECT O_Uid,O_Type,O_Board<br />      FROM   {$config['tbprefix']}Online<br />      WHERE  O_Last &gt; $Outdated<br />      ORDER BY O_Last DESC<br />   ";<br />   $sth = $dbh -&gt; do_query($queryOnline);<br />   $a = 0;<br />   $r = 0;<br />   $OnlineUsers = Array();<br />   while (list($ol_usernum,$Type,$VisitingBoard) = $dbh -&gt; fetch_array($sth)) {<br />      // Check if the user is browsing this board and update the counters accordingly<br />      if ( $VisitingBoard == $Board ) {<br />         ${$Type}++;<br />      }<br />      // Add this user to the list of online users if they are logged in.<br />      if ( $ol_usernum ) {<br />         $OnlineUsers[] = $ol_usernum;<br />      }<br />   }<br />// End of Online Users hack.
<br /><br />Now, I haven't tried this, but I think it should work. =]
_________________________
/Gardener | Complete list of my mods

Top
#262240 - 12/12/03 05:40 AM Re: Beta-[6.4] Online Users 2.0 [Re: c0bra]
DLWebmaestro Offline
Addict

Registered: 08/08/00
Posts: 1802
Loc: North Carolina
I believe you need to keep the quotes in $a="0"; and $r="0";

Top
#262241 - 12/12/03 06:54 AM Re: Beta-[6.4] Online Users 2.0 [Re: eslmix]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
As I use those as integers (for each user online I increase the number by one) they shouldn't have quotes. It won't really matter though, unless they are checked with === at some point later in the script and I don't see why that would be necessary.<br /><br />But of course I can be wrong. =]
_________________________
/Gardener | Complete list of my mods

Top
#262242 - 12/12/03 02:16 PM Re: Beta-[6.4] Online Users 2.0 [Re: c0bra]
Turbosport Offline
Member

Registered: 09/08/01
Posts: 157
Loc: Kent, UK.
Gardener you can have 10 points for that one, cheers <img src="http://www.ubbdev.com/forum/images/graemlins/laugh.gif" alt="" />
_________________________
Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!

Top
#262243 - 07/04/04 01:32 AM Re: Beta-[6.4] Online Users 2.0 [Re: c0bra]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
Will this work for 6.5? It seems like all the mods are breaking for 6.5, requiring them to be rewritten. What about this one?
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#262244 - 05/16/05 11:33 PM Re: Beta-[6.4] Online Users 2.0 [Re: luan]
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.
[]donJulio said:<br />Will this work for 6.5? It seems like all the mods are breaking for 6.5, requiring them to be rewritten. What about this one? [/]<br /><br />This is definitely a great hack that should be implemented in the upcoming version. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /><br /><br />I would also like to know if this will work with v6.5.1.1. Anyone had success with this yet?

Top
#262245 - 05/17/05 02:02 AM Re: Beta-[6.4] Online Users 2.0 [Re: General_Failure]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
I have it working with 6.5.1.1 <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#262246 - 05/17/05 07:10 AM Re: Beta-[6.4] Online Users 2.0 [Re: luan]
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.
[]donJulio said:<br />I have it working with 6.5.1.1 <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> [/]<br /><br />Thanks for confirming....did you have to change any of the code to implement this hack into 6.5.1.1 that I should know about before I get started?

Top
#262247 - 05/18/05 03:00 PM Re: Beta-[6.4] Online Users 2.0 [Re: General_Failure]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
I don't recall having to change any of the code exactly, but it was a little more work figuring out where to put the code in the .php files because I think the snippets they tell you to look for and then paste the new stuff under had changed a little bit, so the Copy + Find didn't work for me. The code added by the mod doesn't need to be changed.
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#262248 - 05/18/05 07:03 PM Re: Beta-[6.4] Online Users 2.0 [Re: General_Failure]
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.
Thanks....yea, through what you gave me....I just worked through it and it's up and running. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /><br /><br />Thanks again for the reply,<br />Gonzo
_________________________
F-Body Hideout
Project Speedy

Top
#262249 - 05/23/05 03:27 AM Re: Beta-[6.4] Online Users 2.0 [Re: General_Failure]
Jest Offline
Lurker

Registered: 02/23/05
Posts: 7
It's working for me too (6.5.1)... <br /> <br />Can someone modify the code to allow admins and mods to see the online status. When the users has set the status in hois profiel to NO (Do you want to be visible on the "Who's Online" screen?), than also admins and mods are showing the OFFLINE icon or status... <br /> <br />It would be fine to have a separate status for "invisible" users (to make another icon for this > online but invisible)...
_________________________
br
Thomas
www.mobile.si

Top
Page 1 of 2 1 2 >



Moderator:  Ian_W 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks